﻿using System;

class CalculationWithTwoIntegers
{
    static void Main()
    {
        Console.WriteLine("A program that reads two positive integer numbers and prints how many numbers p exist between them such that the remainder of the division by 5 is 0 (inclusive). Example: p(17,25) = 2.\r\n");
        Console.Write("Enter the first number: ");
        string consoleInput = Console.ReadLine();
        int firstInt = int.Parse(consoleInput);
        Console.WriteLine();
        Console.Write("Enter the second number: ");
        consoleInput = Console.ReadLine();
        int secondInt = int.Parse(consoleInput);
        int count = 0;
        for (int i = firstInt; i <= secondInt; i++)
        {
            if (i % 5 == 0)
            {
                count++;
            }
        }
        Console.WriteLine();
        Console.WriteLine("The numbers in the interval [{0}...{1}] that have no remainder of division by 5 are: {2}", firstInt, secondInt, count);        
    }
}

